Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
promise-map-series
Advanced tools
Call an iterator function for each element of an array in series, ensuring that no iterator is called before the promise returned by the previous iterator is fulfilled, in effect preventing parallel execution. Like async.mapSeries, but for promises.
npm install --save promise-map-series
var mapSeries = require('promise-map-series')
mapSeries(array, iterator[, thisArg]).then(function (newArray) {
...
})
array
: An array of values (should not be promises).
iterator
: Function that returns a promise or a value for the new
array. The iterator
will be called once for each element. If iterator
returns a promise, then iterator
will only be called for the next element
once that promise is fulfilled. If the promise is rejected or iterator
throws an error, iteration will stop immediately and mapSeries
returns a
rejected promise. The iterator
function receives three arguments:
item
: The current item in the array.
index
: The current index in the array.
array
: The original array
argument.
thisArg
(optional): Value to use as this
when executing iterator
.
0.2.3
FAQs
Map over array avoiding parallel execution, using promises
The npm package promise-map-series receives a total of 699,609 weekly downloads. As such, promise-map-series popularity was classified as popular.
We found that promise-map-series demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.